package com.example.tang.zhayan.ui;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.tang.zhayan.R;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

/**
 * Created by yang on 2015/12/19.
 */

@ContentView(R.layout.activity_setting_wallet)
public class SettingWalletActivity extends AppCompatActivity implements View.OnClickListener{

    @ViewInject(R.id.iv_add)
    private ImageView iv_add;

    @ViewInject(R.id.iv_back)
    private ImageView iv_back;

    @ViewInject(R.id.ll_show)
    private LinearLayout ll_show;

    private boolean isShow = false;

    @ViewInject(R.id.tv_count)
    private TextView tv_count;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        initView();
    }

    private void initView() {
        iv_add.setOnClickListener(this);
        iv_back.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.iv_back:
                finish();
                break;
            case R.id.iv_add:
                if(isShow){
                    ll_show.setVisibility(View.INVISIBLE);
                }else {
                    ll_show.setVisibility(View.VISIBLE);
                }
                isShow = !isShow;
                break;
        }
    }
}
